#include "list.hpp"

using namespace ns_list;

void Test1()
{
    list<int> l1;
    l1.push_back(1);
    l1.push_back(2);
    l1.push_back(3);
    l1.push_back(4);
    l1.Show();

    l1.push_front(5);
    l1.push_front(9);
    l1.push_front(7);
    l1.push_front(6);
    l1.push_front(8);
    l1.Show();

    l1.pop_back();
    l1.pop_back();
    l1.Show();

    l1.pop_front();
    l1.pop_front();
    l1.pop_front();
    l1.Show();
}

void Test2()
{
    list<int> lt1;
    lt1.push_back(1);
    lt1.push_back(2);
    lt1.push_back(3);
    lt1.push_back(4);
    lt1.push_back(5);

    list<int> copy(lt1);
    copy.Show();

    list<int> lt2;
    lt2.push_back(8);
    lt2.push_back(0);
    lt2.push_back(9);
    lt1 = lt2;
    lt1.Show();
}        

void Test3()
{
    list<int> lt1;
    list<int>::iterator lt = lt1.begin();
    lt = lt1.insert(lt, 1);
    lt = lt1.insert(lt, 2);
    lt = lt1.insert(lt, 3);
    lt = lt1.insert(lt, 4);
    lt = lt1.insert(lt, 5);
    lt1.Show();

    lt = lt1.erase(lt);
    lt = lt1.erase(lt);
    lt = lt1.erase(lt);
    lt1.Show();
}

void Test4()
{
    list<int> lt;
    lt.push_back(1);
    lt.push_back(2);
    lt.push_back(3);
    lt.Show();
}

int main()
{
    //Test1();
    //Test2();
    //Test3();
    Test4();

    return 0;
}